<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>电子烟花控制模块</title>
    <link
      rel="stylesheet"
      href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap"
    />
    <style>
      body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
        background-color: #cbcbcb24;
        color: #333;
      }
      .container {
        padding: 20px;
      }
      .card {
        background-color: #ffffff;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 20px;
        padding: 20px;
      }
      .card h2 {
        margin-top: 0;
        font-family: "Montserrat", sans-serif;
      }
      .input-group {
        margin-bottom: 15px;
      }
      .input-group label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
      }
      .input-group input,
      .input-group select {
        width: 100%;
        padding: 5px;
        border: 1px solid #cccccc;
        border-radius: 4px;
        box-sizing: border-box;
      }
      .slider-container {
        display: flex;
        align-items: center;
        position: relative;
      }
      .slider-value {
        margin-left: 10px;
        font-weight: bold;
      }
      input[type="range"] {
        -webkit-appearance: none;
        width: 100%;
        height: 8px;
        outline: none;
        transition: opacity 0.2s;
        border-radius: 5px;
      }
      input[type="range"]:hover {
        opacity: 1;
      }
      .brightness-slider::-webkit-slider-runnable-track {
        background: #d3d3d3;
        height: 10px;
      }
      .brightness-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #ffffff;
        border: 2px solid #4caf50;
        box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
        cursor: pointer;
        margin-top: -5px; /* Adjust to align thumb with track */
      }
      .brightness-slider::-moz-range-track {
        background: #d3d3d3;
      }
      .brightness-slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #ffffff;
        border: 2px solid #4caf50;
        box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
        cursor: pointer;
      }
      .brightness-slider::-ms-track {
        background: transparent;
        border-color: transparent;
        color: transparent;
      }
      .brightness-slider::-ms-fill-lower {
        background: #d3d3d3;
        border-radius: 5px;
      }
      .brightness-slider::-ms-fill-upper {
        background: #520000;
        border-radius: 5px;
      }
      .brightness-slider::-ms-thumb {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #ffffff;
        border: 2px solid #4caf50;
        box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
        cursor: pointer;
      }
      .hue-slider {
        background: linear-gradient(
          to right,
          red,
          orange,
          yellow,
          green,
          cyan,
          blue,
          violet,
          red
        );
      }
      .hue-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: hsl(0, 0%, 100%);
        border: 2px solid #4caf50;
        box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
        cursor: pointer;
        margin-top: 0px; /* Adjust to align thumb with track */
      }
      .hue-slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: hsl(0, 100%, 50%);
        border: 2px solid #4caf50;
        box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
        cursor: pointer;
      }
      .hue-slider::-ms-thumb {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: hsl(0, 100%, 50%);
        border: 2px solid #4caf50;
        box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
        cursor: pointer;
      }

      nav {
      background-color: white;
      color: black;
      padding: 10px 0;
      border: 1px solid #555;
      border-radius: 50px;
      display: flex;
      justify-content: center;
      position: relative;
      z-index: 1;
      width: 80%;
      margin: 20px auto;
    }

    ul {
      list-style-type: none;
      margin: 0;
      padding: 0;
      display: flex;
    }

    li {
      cursor: pointer;
      position: relative;
      transition: color 0.3s ease;
      padding: 15px 15px;
      border-radius: 4px;
      /* 添加圆角效果 */
    }

    a {
      text-decoration: none;
      color: black;
      font-size: 16px;
    }

    /* 初始状态下不显示线条 */
    li::after {
      content: '';
      position: absolute;
      bottom: -5px;
      left: 0;
      width: 0;
      height: 4px;
      background-color: #b694c3;
      border-radius: 4px;
      /* 添加圆角效果 */
      transition: width 0.3s ease, left 0.3s ease;
      clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);

    }

    /* 选中状态下显示线条 */
    li.active::after {
      width: 100%;
    }

    li.active a {
      color: #b694c3;
    }

    /* 媒体查询，当页面宽度小于一定值时调整样式 */
    @media (max-width: 768px) {
      nav {
        width: 90%;
        padding: 5px 0;
      }

      li {
        padding: 5px 10px;
      }

      a {
        font-size: 14px;
      }
    }

    </style>
  </head>
  <body>
    
      <nav>
        <ul>
          <li ><a>烟花控制</a></li>
          <li class="active"><a href="advanced_control.html">高级控制</a></li>
          <li ><a href="about_electric_firework.html">关于电子烟花</a></li>
          <li><a href="contact_the_author.html">联系作者</a></li>
        </ul>
      </nav>

      <div class="container">
      <div class="card">
        <h2>电子烟花控制模块</h2>
        <div class="input-group">
          <label for="max_bright">最大亮度 (max_bright)</label>
          <div class="slider-container">
            <input
              type="range"
              id="max_bright"
              name="max_bright"
              class="brightness-slider"
              value="128"
              min="0"
              max="255"
            />
            <span class="slider-value" id="slider-bright">28</span>
          </div>
        </div>
        <div class="input-group">
          <label for="hue">颜色(hue)</label>
          <div class="slider-container">
            <input
              type="range"
              id="hue"
              name="hue"
              class="hue-slider"
              value="0"
              min="0"
              max="360"
            />
            <span class="slider-value" id="slider-color">0</span>
          </div>
        </div>
        <div class="input-group" id="group" style="display: none">
          <br />
          <label for="hue">背景颜色(bg-hue)</label>
          <div class="slider-container">
            <input
              type="range"
              id="hue-bg"
              class="hue-slider"
              value="0"
              min="0"
              max="360"
            />
            <span class="slider-value" id="slider-color-bg">0</span>
          </div>
        </div>

        <div class="input-group">
          <label for="delay_time"
            >延迟时间 (Delay_Time)(控制速度)(20-50为宜)</label
          >
          <input
            type="number"
            id="delay_time"
            name="delay_time"
            value="30"
            min="0"
            max="255"
          />
        </div>
        <div class="input-group">
          <label for="control_type">控制类型 (Control_type)</label>
          <select id="control_type" name="control_type">
            <option value="Circulation">全局播放 (Circulation)</option>
            <option value="Random">随机播放 (Random)</option>
            <option value="Single">单个播放 (Single)</option>
          </select>
        </div>
        <div class="input-group">
          <label for="mode">模式 (Mode)</label>
          <select id="mode" name="mode">
            <option value="Rainbow_Gradient">彩虹渐变 (Rainbow_Gradient)</option>
            <option value="Skyarrow_Single">单箭头 (Skyarrow_Single)</option>
            <option value="Skyarrow_Color">彩箭头 (Skyarrow_Color)</option>
            <option value="Bloom">绽放 (Bloom)</option>
            <option value="Launch_Bg">背景发射 (Launch_Bg)</option>
            <option value="Launch_Cs">匀速发射 (Launch_Cs)</option>
            <option value="Launch_As">加速发射 (Launch_As)</option>
            <option value="Five_Point_Flow">五点流动 (Five_Point_Flow)</option>
            <option value="Breath">呼吸 (Breath)</option>
          </select>
        </div>
      </div>
    </div>
    <script src="advanced_control.js"></script>
  </body>
</html>
